package com.huawei.java.main;

import com.huawei.java.solver.Dinic;
import com.huawei.java.util.DataResults;

import java.util.List;

public class Main {
	public static void main(String[] args) {

		DataResults data = new DataResults();
		List<List<Integer>> demands = data.getDemands();
		Integer[][] allocation = data.getAllocation();
		List<Integer> supply = data.getSupply();

		for (List<Integer> demand : demands) {
			Dinic dinic = new Dinic(allocation, supply, demand);
			dinic.getResult();
			Integer[][] anotherPlan = dinic.getAnotherPlan();
			data.writeAnswer(anotherPlan);
		}
	}
}
